﻿using System;
using System.Collections.Generic;
using Newtonsoft.Json;

namespace Pay.DTO {
	/// <summary>
	/// 产品查询请求
	/// </summary>
	[JsonObject(MemberSerialization.OptOut)]
	public class GoodsQuery : PageQuery {
		/// <summary>
		/// 名称/编号
		/// </summary>
		public string keyword { get; set; }
		/// <summary>
		/// 商品状态：0销售中（默认），1下架中,2销售和下架
		/// </summary>
		public int sale_status { get; set; }
		/// <summary>
		/// 排序：0推荐【默认】、1销量、2价格高到低、3价格低到高,4:新品
		/// </summary>
		public int sort { get; set; }
		/// <summary>
		/// 商品分类
		/// </summary>
		public long category_id { get; set; }
		/// <summary>
		/// 卖家编号
		/// </summary>
		public long sell_id { get; set; }
		/// <summary>
		/// O商户号
		/// </summary>
		public long merchant_id { get; set; }
		/// <summary>
		/// 是否销售完:true是已售，false在售
		/// </summary>
		public bool? sell_out { get; set; }
		/// <summary>
		/// 是否查询促销
		/// </summary>
		public bool select_sale { get; set; }
		/// <summary>
		/// 属性,属性值的组合.格式:{"key1":value1,"key2":value2,"color_ids":[1,2]};&lt;a href="/Help/Api/POST-common-test"&gt;参数&lt;/a&gt;
		/// 如goods/cars?page=1&amp;props={"city_id":350200,"color_ids":[1,2]}
		/// </summary>
		public string props { get; set; }
        /// <summary>
        /// 后台用的字段：审核状态 [1：在售（包含待审核与审核通过），2：待审核，3：销售中,4：违规下架,5：删除]
        /// </summary>
        public int audit_status { get; set; }
		/// <summary>
		/// 商品标签 better：精选，hot：爆款
		/// </summary>
		public string tag { get; set; }
        /// <summary>
        /// oem产品类型
        /// </summary>
        public long categoryid { get; set; }
        public long[] Ids { get; set; }
        /// <summary>
        /// 专题id
        /// </summary>
        public long subject_id { get; set; }

        /// <summary>
        /// 是否是拓垦商城
        /// </summary>
        public bool IsTokenMall { get; set; }

        /// <summary>
        /// 商品sku
        /// </summary>
        public string sku { get; set; }
        /// <summary>
        /// 商品来源类型 0：系统，1：海淘乐，2：候鸟
        /// </summary>
        public int? is_htl { get; set; }

        /// <summary>
        /// 最小价格
        /// </summary>
        public decimal? min_price { get; set; }
        /// <summary>
        /// 最大价格
        /// </summary>
        public decimal? max_price { get; set; }

    }

	/// <summary>
	/// 产品查询请求
	/// </summary>
	[Serializable]
	public class goods_query : head_req_page {
		public goods_query() {
		}
		/// <summary>
		/// 名称/编号
		/// </summary>
		public string keyword { get; set; }
		/// <summary>
		/// 商品状态：0销售中（默认），1下架中
		/// </summary>
		public int sale_status { get; set; }
		/// <summary>
		/// 排序：1最新(默认)、2最新更新、3价格高到低、4价格低到高、5按车龄最小，6按里程最少
		/// </summary>
		public int sort { get; set; }
		/// <summary>
		/// 商品分类
		/// </summary>
		public long category_id { get; set; }
		/// <summary>
		/// 商户号
		/// </summary>
		public long merchant_id { get; set; }
		/// <summary>
		/// 属性,属性值的组合.格式:{"key1":value1,"key2":value2,"color_ids":[1,2]};&lt;a href="/Help/Api/POST-common-test"&gt;参数&lt;/a&gt;
		/// 如goods/cars?page=1&amp;props={"city_id":350200,"color_ids":[1,2]}
		/// </summary>
		public string props { get; set; }
		/// <summary>
		/// 审核状态 [1：在售（包含待审核与审核通过），2：待审核，3：审核通过,4：违规车源,5：删除]
		/// </summary>
		public int audit_status { get; set; }
		/// <summary>
		/// 商品标签 better：精选，hot：爆款
		/// </summary>
		public string tag { get; set; }
		/// <summary>
		/// 是否销售完:true是已售，false在售
		/// </summary>
		public bool? sell_out { get; set; }
	}
    /// <summary>
    /// 分销商品查询
    /// </summary>
    [Serializable]
    public class distribution_goods_query {
        /// <summary>
        /// 商品id
        /// </summary>
        public long product_id { get; set; }
        /// <summary>
        /// 分销用户id
        /// </summary>
        public long merchant_id { get; set; }
    }
}